---
title: "SQL-022: Retrieve attorney firm list for case update"
summary: Retrieve firm-level attorney records for the update-case status/attorney maintenance UI.
status: draft
owner: SAIF Documentation Pipeline
last_reviewed: 2026-08-21
library: SAIF.Application.Claim.Legal
reference_type: embedded
---

# SQL-022 Retrieve attorney firm list for case update

Retrieves `OTHER_FIRM` rows of type `ATTY` or `OUTC` (attorney or outside counsel firm), for the `ATTORNEYLISTSQL` code-table lookup used by the update-case status/attorney maintenance UI. The SQL text is identical to [SQL-016](SQL-016-other-parties-attorney-list.md)'s non-union portion, but is defined independently as a separate `Private Const` in `clsUpdateCaseManager.vb`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-022 |
| **Operation type** | Read |
| **Execution method** | Inline SQL (`clsCodeCollection.GetCodeCollection`) |
| **Database** | Oracle |
| **Command type** | Text |
| **Business object** | N/A (Application layer) |
| **Criteria property** | N/A (Application layer) |
| **Lifecycle method** | N/A (Application layer) |
| **Application class** | `clsUpdateCaseManager` |

## Parameters

No runtime parameters — this is a static code-table lookup constant (`ATTORNEYLISTSQL`), executed as-is via `clsCodeCollection.GetCodeCollection(DPI, ATTORNEYLISTSQL)`.

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [OTHER_FIRM](../database-tables.md#other_firm) | SELECT | `OTHER_FIRM_SEQ_NUM`, `FIRM_NAME`, `OTHER_FIRM_TYPE_CODE` |

## Sample SQL

```sql
SELECT
  to_char(OTHER_FIRM_SEQ_NUM) As code,
  Firm_Name As code_descr
FROM OTHER_FIRM
WHERE OTHER_FIRM_TYPE_CODE IN ('ATTY', 'OUTC')
```

## Business rules
- [BR-LGL-009: Worker-attorney firm change creates a system audit case note](../business-rules.md#br-lgl-009-worker-attorney-firm-change-creates-a-system-audit-case-note)*
- [BR-LGL-010: Worker attorney change creates a system audit case note](../business-rules.md#br-lgl-010-worker-attorney-change-creates-a-system-audit-case-note)*
- [BR-LGL-012: Secondary consolidated cases mirror the primary case state](../business-rules.md#br-lgl-012-secondary-consolidated-cases-mirror-the-primary-case-state)*

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `SAIF.Application.Claim.Legal\LegalNet\clsUpdateCaseManager.vb`
